package transparent;

import javax.swing.BoundedRangeModel;
import javax.swing.JSlider;

public class TransparentSlider extends JSlider {

	private static final int DEFAUL_MAJOR_TICK_SPACING = 20;
	private static final int DEFAUL_MINOR_TICK_SPACING = 4;
	/**
	 * 
	 */
	private static final long serialVersionUID = 6852486357405077323L;

	public TransparentSlider() {
		this(JSlider.HORIZONTAL, 0, 100, 50);
	}

	public TransparentSlider(BoundedRangeModel brm) {
		super(brm);
		this.setOpaque(false);
	}

	public TransparentSlider(int orientation, int min, int max, int value) {
		super(orientation, min, max, value);
		this.setOpaque(false);
	    this.setMinorTickSpacing(DEFAUL_MINOR_TICK_SPACING);
	    this.setMajorTickSpacing(DEFAUL_MAJOR_TICK_SPACING);
		this.setPaintLabels(true);
		this.setPaintTicks(true);
	}

	public TransparentSlider(int min, int max, int value) {
		this(JSlider.HORIZONTAL, min, max, value);
	}

	public TransparentSlider(int min, int max) {
		super(min, max);
		this.setOpaque(false);
	    this.setMinorTickSpacing(DEFAUL_MINOR_TICK_SPACING);
	    this.setMajorTickSpacing(DEFAUL_MAJOR_TICK_SPACING);
		this.setPaintLabels(true);
		this.setPaintTicks(true);
	}

	public TransparentSlider(int orientation) {
		super(orientation);
		this.setOpaque(false);
	    this.setMinorTickSpacing(DEFAUL_MINOR_TICK_SPACING);
	    this.setMajorTickSpacing(DEFAUL_MAJOR_TICK_SPACING);
		this.setPaintLabels(true);
		this.setPaintTicks(true);
	}
	
	
}
